let express = require("express");
let app = express();

app.get("/", function(req, res){
    res.send("<h1>Hello Express.<h2>");
});

app.get("/signup", function(req, res){
    res.sendFile(__dirname + "/view/" + "signup.html");
});

app.get("/signup_do", function(req, res){
    let username = req.query.username;
    let password = req.query.password;

    res.send("username : " + username + ", password : " + password);
});

let server = app.listen(3000, function(){
    let host = server.address().address;
    let port = server.address().port;

    console.log("Server listening at http://%s:%s", host, port);
});